package springboot;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;

@Component
public class MyBean {

	@Autowired
	private JdbcTemplate jdbcTemplate;

	public String queryEncoding() {
		StringBuilder builder = new StringBuilder();
		builder.append("SELECT CODE FROM EBIZ_CODE T WHERE T.ID = 1");
		List<String> list = jdbcTemplate.queryForList(builder.toString(), String.class);
		return list.get(0);
	}

}
